package com.didispace;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.turbine.EnableTurbine;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableAutoConfiguration
@EnableTurbine
@EnableDiscoveryClient
public class TurbineApplication {

	public static void main(String[] args) {
		SpringApplication.run(TurbineApplication.class, args);
	}

	// @Bean
	// public ServletRegistrationBean getServlet() {
	// 	HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
	// 	ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
	// 	registrationBean.setLoadOnStartup(1);
	// 	registrationBean.addUrlMappings("/hystrix.stream");
	// 	registrationBean.setName("HystrixMetricsStreamServlet");
	// 	return registrationBean;
	// }
}
